local ctx = tgdi.create_context()
print("Text extents:", ctx:text_extents("Test", "Arial", 100, true, true, false, true, 1))
ctx:add_path("m 0 200 b 0 0 300 0 300 0")
ctx:abort_path()
ctx:add_path("Test", "Times New Roman", 100, true, true, false, true, 1)
ctx:flatten_path()
print("Path box:", ctx:path_box())
print("Path:", ctx:get_path())
print("Pixel palette size:", #ctx:get_pixels())
print("Pixel palette size (1/8 - antialiased):", #ctx:get_pixels(true))